package com.wafersystems.springbootdemo.scheduled;


import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.wafersystems.springbootdemo.feign.RemoteAdminService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Random;

/**
 * Scheduled定时任务
 * @author tandk
 * @date 2018/12/5 17:45
 */
@Slf4j
@Component
public class DemoScheduled {
    @Autowired
    RemoteAdminService adminService;

    @Scheduled(cron = "0/60 * * * * ?")
    public void testTask(){
        log.info(adminService.feign("张三", SecurityConstants.FROM_IN).toString());
    }
}
